package com.example.day05;

import com.sun.media.sound.SoftTuning;

// 静态块在类加载时自动执行一次, 之后不再执行
public class StaticBlockTest {

    static {
        System.out.println("static block");
    }

    public StaticBlockTest() {
        System.out.println("constructor");
    }

    public static void main(String[] args) {
        StaticBlockTest s1 = new StaticBlockTest(); //
        System.out.println("---");
        StaticBlockTest s2 = new StaticBlockTest(); //
    }

}